I would still like to use absolute error in the future because it
would remove the relationship between the number of zeros in the
test pixels and the total error score, but we do not seem to be at
a stage where that is practical yet (bug 725339).
This reverts commit
56be40fbef61fd32672209d38a5e874fea603e82.
Conflicts:
babl/babl-fish-path.c
babl_process (fpi->fish_destination_to_rgba,
fpi->destination, fpi->destination_rgba_double, fpi->num_test_pixels);
- *path_error = babl_abs_error (fpi->destination_rgba_double,
- fpi->ref_destination_rgba_double,
- fpi->num_test_pixels * 4);
+ *path_error = babl_rel_avg_error (fpi->destination_rgba_double,
+ fpi->ref_destination_rgba_double,
+ fpi->num_test_pixels * 4);
#if 0
fpi->fish_rgba_to_source->fish.processings--;
}
double
-babl_abs_error (const double *imgA,
- const double *imgB,
- long samples)
-{
- double abs_error = 0.0;
- long i;
-
- for (i = 0; i < samples; i++)
- {
- double sample_error = fabs (imgA[i] - imgB[i]);
-
- if (sample_error > abs_error)
- abs_error = sample_error;
- }
-
- return abs_error;
-}
-
-double
-babl_rel_avg_error (const double *imgA,
- const double *imgB,
- long samples)
+babl_rel_avg_error (double *imgA,
+ double *imgB,
+ long samples)
{
double error = 0.0;
long i;
long ticks_end);
double
-babl_rel_avg_error (const double *imgA,
- const double *imgB,
- long samples);
-
-double
-babl_abs_error (const double *imgA,
- const double *imgB,
- long samples);
+babl_rel_avg_error (double *imgA,
+ double *imgB,
+ long samples);
#endif